using System.Text;
using BBX.Common;
using BBX.Entity;
using BBX.Forum;
using BBX.Web.UI;

namespace BBX.Web
{
    public class usercp : UserCpPage
    {
        public System.String avatarurl = "";
        public System.Int32 avatartype = 1;
        public System.Int32 avatarwidth;
        public System.Int32 ismoder;
        public System.Int32 avatarheight;
        public System.String usergroupattachtype;
        public AdminGroup admingroupinfo;
        public System.String score1 = "";
        public System.String score2 = "";
        public System.String score3 = "";
        public System.String score4 = "";
        public System.String score5 = "";
        public System.String score6 = "";
        public System.String score7 = "";
        public System.String score8 = "";

        protected override void ShowPage()
        {
            pagetitle = "用户控制面板";
            if (!IsLogin())
            {
                return;
            }
            score1 = ((System.Decimal)user.ExtCredits1).ToString();
            score2 = ((System.Decimal)user.ExtCredits2).ToString();
            score3 = ((System.Decimal)user.ExtCredits3).ToString();
            score4 = ((System.Decimal)user.ExtCredits4).ToString();
            score5 = ((System.Decimal)user.ExtCredits5).ToString();
            score6 = ((System.Decimal)user.ExtCredits6).ToString();
            score7 = ((System.Decimal)user.ExtCredits7).ToString();
            score8 = ((System.Decimal)user.ExtCredits8).ToString();
            if (!base.IsErr() && useradminid > 0)
            {
                admingroupinfo = AdminGroup.FindByID(usergroupid);
            }
            //var stringBuilder = new StringBuilder();
            //if (!this.usergroupinfo.AttachExtensions.IsNullOrEmpty())
            //{
            //	stringBuilder.AppendFormat("[id] in ({0})", this.usergroupinfo.AttachExtensions);
            //}
            //this.usergroupattachtype = Attachments.GetAttachmentTypeString(stringBuilder.ToString());
            usergroupattachtype = AttachType.GetAttachmentTypeString(usergroupinfo, null);
            newnoticecount = Notice.GetNewNoticeCountByUid(userid);
        }
    }
}